/*
 * Class: Logger
 * Created by: Mary Joy Pascual
 * Date Created: 06/17/2014
 * Company: Netsuite
*/
package com.netsuite.logger;

import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;

public class LoggerImp {
	
	static Logger logger = Logger.getLogger(LoggerImp.class);
	 
	static {
		 PropertyConfigurator.configure("simplelog.properties");
	}
	
	public static void startLog(String className, String methodName){
		if(logger.isDebugEnabled()){
			logger.info("--> Start: "+className+" |  "+methodName);
		}
	}
	
	public static void endLog(String className, String methodName){
		if(logger.isDebugEnabled()){
			logger.info("<-- End: "+className+" |  "+methodName);
		}
	}
	
	public static void errorLog(String className, String message){
		if(logger.isDebugEnabled()){
			logger.error("[Error]: "+className+" |  "+message);
		}
	}
	
	public static void infoLog(String className, String message){
		if(logger.isDebugEnabled()){
			logger.info("Info: "+className+" |  "+message);
		}	
	}
	
	public static void debugLog(String className, String message){
		if(logger.isDebugEnabled()){
			logger.info("Debug: "+className+" |  "+message);
		}
	}

}
